<include file="public/header"/>
<div class="am-cf admin-main">
    <!-- sidebar start -->
<include file="public/sidebar"/>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">
        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">派单记录</strong></div>
        </div>

        <div class="am-g">
            <div class="am-u-md-6 am-cf">
                <div class="am-fl am-cf">
                    <div class="am-btn-toolbar am-fl">
                            <a href="{:U('User/lt2')}">
                            <button type="button" class="am-btn am-btn-primary am-btn-xs">
                                    <span class="am-icon-plus"></span>新增</button>
                            </a>
                    </div>
                </div>
            </div>
            <form method="post" action="__URL__/search" class="am-form">
                <div class="am-form-group am-margin-left am-fl">
                    <select name="select" id="select">
                        <option value="phone">手机</option>
                        <option value="yuyue_date">日期</option>
                    </select>
                </div>
                <div class="am-u-md-3 am-cf">
                    <div class="am-fr">
                        <div class="am-input-group am-input-group-sm">
                            <input type="text" class="am-form-field" name="ifin" id="ifin">
                <span class="am-input-group-btn">
                  <button class="am-btn am-btn-default" type="submit">搜索</button>
                </span>
                        </div>
                    </div>
                </div>
            </form>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr>
                        <th class="table-check"><input type="checkbox"/></th>
                        <th class="table-id">手机</th>
                        <th class="table-type">贵姓</th>
                        <th class="table-title">公司</th>
                        <th class="table-title">地址</th>
                        <th class="table-type">日期</th>
                        <th class="table-author">预约</th>
                        <th class="table-date">下单时间</th>
                        <th class="table-date">量体师</th>
                        <th class="table-date">备注</th>
                        <th class="table-date">销售</th>
                        <th class="table-set">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="datas" item="data">
                        <tr>
                            <td><input type="checkbox"/></td>
                            <td>{$data.phone}</td>
                            <td>{$data.xin}</td>
                            <td>{$data.company}</td>
                            <td>{$data.addr}</td>
                            <td>{$data.yuyue_date}</td>
                            <td>{$data.yuyue}</td>
                            <td>{$data.updated|date="Y年m月d日 H:i:s",###}</td>
                            <td>{$data.belong}</td>
                            <td>{$data.descr}</td>
                            <td>{$data.sale}</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="__URL__/../User/lt/phone/{$data.phone}">
                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                            <span class="am-icon-pencil-square-o"></span>录单</button>
                                        </a>
                                        <if condition="session('role') eq 0">
                                            <a href="__URL__/orderBelong/phone/{$data.phone}">
                                        <button class="am-btn am-btn-default am-btn-xs">
                                            <span class="am-icon-copy"></span>派单</button>
                                            </a>
                                            <a href="__URL__/../User/yuyueEdit/id/{$data.id}">
                                            <button class="am-btn am-btn-default am-btn-xs am-text-success">
                                                <span class="am-icon-pencil-square-o"></span>修改
                                            </button>
                                            </a>
                                            <a href="__URL__/orderDel/id/{$data.id}" onclick="javascript:return del()">
                                                <button class="am-btn am-btn-default am-btn-xs am-text-danger">
                                                    <span class="am-icon-trash-o"></span>删除
                                                </button>
                                            </a>
                                        </if>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
                <div class="am-cf">
                    {$page}
                </div>
                <hr/>
                </form>
            </div>
        </div>
    </div>
    <!-- content end -->
</div>
        <script>
            function del(){
                var msg = "确认删除么？";
                if(confirm(msg)==true){
                    return true;
                }else{
                    return false;
                }
            }
        </script>
<include file="public/footer"/>

